package ink.xiaobaibai.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("monthlyfee_deposit")
@NoArgsConstructor
public class MonthlyfeeDeposit implements Serializable {

    private static final long serialVersionUID = 1L;

    public MonthlyfeeDeposit(String orderId, Integer userId, Integer deviceId, BigDecimal amount, String status) {
        this.orderId = orderId;
        this.userId = userId;
        this.deviceId = deviceId;
        this.amount = amount;
        this.status = status;
    }

    public MonthlyfeeDeposit(String orderId, Integer userId, Integer deviceId, BigDecimal amount, String status, String clientUserName, String clientUserPhone, String clientUserAddress, Integer adminUserId) {
        this.orderId = orderId;
        this.userId = userId;
        this.deviceId = deviceId;
        this.amount = amount;
        this.status = status;
        this.clientUserName = clientUserName;
        this.clientUserPhone = clientUserPhone;
        this.clientUserAddress = clientUserAddress;
        this.adminUserId = adminUserId;
    }

    /**
     * 月费押金表主键
     */
    @TableId(value = "order_id")
    private String orderId;

    /**
     * 月费订单id
     */
    @TableField(value = "monthly_order_id")
    private String monthlyOrderId;

    /**
     * 对应用户id
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 绑定的机器id
     */
    @TableField("device_id")
    private Integer deviceId;

    /**
     * 押金金额
     */
    @TableField("amount")
    private BigDecimal amount;

    /**
     * 当前状态
     */
    @TableField("status")
    private String status;

    @TableField("client_user_name")
    private String clientUserName;

    @TableField("client_user_phone")
    private String clientUserPhone;

    @TableField("client_user_address")
    private String clientUserAddress;

    @TableField("admin_user_id")
    private Integer adminUserId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;


}
